
const controllerUrl = '/api/chatai/'


export function chatgptStream(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'chatgptStream',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}
export function initchat(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'initchat',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function addFeedback(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'addFeedback',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function newchat(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'newchat',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function getchat(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'getchat',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function demo2(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'demo2',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}
export function handleDialogue(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'handleDialogue',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}
export function handleAnswer(data: anyObj) {
    return Http.$fetch(
        {
            url: controllerUrl + 'handleAnswer',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}

export function  changeQues(data:anyObj){
    return Http.$fetch(
        {
            url: controllerUrl + 'changeQues',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function  faqView(data:anyObj){
    return Http.$fetch(
        {
            url: controllerUrl + '/faqView',
            method: 'post',
            body: data,
        },
        {
            showSuccessMessage: false,
        }
    )
}
export function  editQuestion(data:anyObj){
    return Http.$fetch(
        {
            url: controllerUrl + '/editQuestion',
            method: 'post',
            body: data,
        }
    )
}

